#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void minmax(int a[], int len, int* min, int* max)
{
	int i;
	*min = *max = a[0];
	for (i = 1; i < len; i++)
	{
		if (a[i] < *min)
			*min = a[i];
		if (a[i] > *max)
			*max = a[i];
	}
}
int main()
{
	int a[] = { 1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,55 };
	int min=a[0], max=a[0];
	minmax(a, sizeof(a) / sizeof(a[0]), &min, &max);
	printf("min=%d,max=%d",min,max);
	return 0;

}